var myScroll;
var position;

function updatePosition () {
    position.innerHTML = this.y>>0;
    positionX.innerHTML = this.x>>0;

    /*if( this.x <= '0' && this.x >= '-750'){
        console.log('1');
    }
    if( this.x <= '-751' && this.x >= '-1500'){
        console.log('2')
    }
    if( this.x <= '-1501' && this.x >= '-2250'){
        console.log('3')
    }
    if( this.x <= '-2251' && this.x >= '-3000'){
        console.log('4')
    }*/
}
function loaded() {
    position = document.getElementById('position');
    positionX = document.getElementById('positionX');
    myScroll = new IScroll('#wrapper', {
        mouseWheel: true,
        deceleration:1,//滑动的速度
        scrollbars: false,//显示滚动条
        scrollX:true,//打开横向滚动
        //startX:-500,
        bounce:false,//取消橡皮筋效果
        click:true,//打开onclick事件
        freeScroll: true, //打开自由滚动
        probeType: 3//监听等级最高，像素级
        
    });

    //myScroll.on('scroll', updatePosition);
    //myScroll.on('scrollEnd', updatePosition);

    console.dir(myScroll.options);
}


document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
